<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>权限配置</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="-2096005416">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/admin/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/admin/js/jquery-1.7.1.min.js"></script>
	
	<script type="text/javascript" src="/admin/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/admin//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<script type="text/javascript" src="/admin/js/jquery-ui-1.10.2.custom.min.js"></script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/admin/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/admin/css/define.css"/>
	<!-- icon font -->
  	<link rel="stylesheet" href="/admin/css/iconfont.css">
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "-2096005416";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/admin/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/admin/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("limit.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		document.title={
  			 "insert":"创建权限配置"
  			,"inport":"导入权限配置"
  			,"update":"修改权限配置"
  			,"detail":"权限配置详情"
  		}[options.edittype];
  		THIS.setData(protocol.data); 
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>
<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		 
	$("#limitForm").form({
		"":function(){}
		,"srvLimited.slId":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"srvLimited.slProject":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"srvLimited.slGroup":function(el){
		}
		,"srvLimited.slLimit":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择权限值";
			}
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>

<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>


<form enctype="{{inports!=null?'multipart/form-data':''}}" lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'||edittype=='inport'}}" class="form editform edittype_{{edittype}}" ref="SrvLimited" id="limitForm" name="limitForm" target="jsoniframe" action="limit.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt">
				温馨提示：请仔细填写权限配置相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
			
			
			<lz:block lz:if="{{inports}}">
			  <div class="line"></div>
			  <dl style="width:98%;">
			  	<dt>Excel文件:</dt>
			  	<dd>
			  		<input type="hidden" value="{{inports}}" name="inports" id="inports" />
			  		<input type="hidden" value="{{inport$}}" name="inport$" id="inport$" />
			  		<input name="file" name="file" type="file"/>
			  		<b>*</b>
			  		<div>
						请上传excel文件，表格列依次为：[{{inport$}}]，excel表格第一行为列名称，将不作为上传数据行
					</div>
			  	</dd>
			  </dl>
			  <div class="line"></div>
			</lz:block>
	{{lz.set("slId_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"slId"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"slId"))))}}
	{{lz.set("slId_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$slId}}
	<dl lz:if="{{slId_editable||slId_readonly}}" class="slId hidden " major  ref="slId">
		<dt>编　　号:</dt>
		<dd lz:if="{{slId_editable}}" input="hidden">
			<lz:block lz:if="{{srvLimited$slId}}">
				{{srvLimited$slId}}
			</lz:block>
			<lz:block lz:if="{{!srvLimited$slId}}">
			<input type="hidden" value="{{lz.htm(srvLimited.slId)}}" name="srvLimited.slId" id="slId" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{slId_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="slId">{{srvLimited.slId}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvLimited.slId$||srvLimited.slId)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$slId}}
	{{lz.set("slProject_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"slProject"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"slProject"))))}}
	{{lz.set("slProject_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$slProject}}
	<dl lz:if="{{slProject_editable||slProject_readonly}}" class="slProject hidden " major  ref="slProject">
		<dt>所属项目:</dt>
		<dd lz:if="{{slProject_editable}}" input="hidden">
			<lz:block lz:if="{{srvLimited$slProject}}">
				{{srvLimited$slProject}}
			</lz:block>
			<lz:block lz:if="{{!srvLimited$slProject}}">
			<input type="hidden" value="{{lz.htm(srvLimited.slProject)}}" name="srvLimited.slProject" id="slProject" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{slProject_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="slProject">{{srvLimited.slProject}}</textarea>
		 		<span>
		 	
			 <a href="javascript:void(0);" onclick="window.href('/admin/permissions/project.details.html?key=srvLimited.slProject}')">
			 {{lz.html(srvLimited.slProject$||srvLimited.slProject)}}</a>
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$slProject}}
	{{lz.set("slGroup_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"slGroup"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"slGroup"))))}}
	{{lz.set("slGroup_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$slGroup}}
	<dl lz:if="{{slGroup_editable||slGroup_readonly}}" class="ribs slGroup  " major  ref="slGroup">
		<dt>所属角色:</dt>
		<dd lz:if="{{slGroup_editable}}" input="query">
			<lz:block lz:if="{{srvLimited$slGroup}}">
				{{srvLimited$slGroup}}
			</lz:block>
			<lz:block lz:if="{{!srvLimited$slGroup}}">
		 			<input title="请输入组织部门组名称进行查询" class="combox narrow" action="/admin/permissions/group.query.do?value={param}" type="text" id="slGroup" name="srvLimited.slGroup" text="{{lz.html(srvLimited.slGroup$||srvLimited.slGroup)}}" value="{{lz.htm(srvLimited.slGroup)}}" />
		 			<a class="lookup" href="javascript:void(0);" onclick="if($.trim($('#slGroup').val())==''){return;};window.href('/admin/permissions/group.detail.html?key='+$('#slGroup').val())"></a>
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{slGroup_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="slGroup">{{srvLimited.slGroup}}</textarea>
		 		<span>
		 	
			 <a href="javascript:void(0);" onclick="window.href('/admin/permissions/group.details.html?key=srvLimited.slGroup}')">
			 {{lz.html(srvLimited.slGroup$||srvLimited.slGroup)}}</a>
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$slGroup}}
	{{lz.set("slLimit_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"slLimit"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"slLimit"))))}}
	{{lz.set("slLimit_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$slLimit}}
	<dl lz:if="{{slLimit_editable||slLimit_readonly}}" class="slLimit  " major  ref="slLimit">
		<dt>权 限 值:</dt>
		<dd lz:if="{{slLimit_editable}}" input="select">
			<lz:block lz:if="{{srvLimited$slLimit}}">
				{{srvLimited$slLimit}}
			</lz:block>
			<lz:block lz:if="{{!srvLimited$slLimit}}">
		 	<select class="narrow" id="slLimit" name="srvLimited.slLimit">
		 		<option value="">请选择</option>
				<option lz:for="{{slLimit$items}}" value="{{item.key}}" selected='{{srvLimited.slLimit==item.key?"selected":""}}'>{{item.value}}</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择权限配置的权限值</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{slLimit_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="slLimit">{{srvLimited.slLimit}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvLimited.slLimit$||srvLimited.slLimit)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$slLimit}}
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{srvLimited.slId}}" name="srvLimited.slId" id="slId" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'||edittype=='inport'}}">
				<button class="button" type="submit">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/permissions/limit.edit.html?edittype=update&id={{srvLimited.id}}"'>
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					修改&nbsp;&nbsp;</button>
				<button lz:if="{{canDel}}" type="button" class="button" onclick="deleteLimit('{{srvLimited.id}}','{{srvLimited.slProject}}')">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					删除&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>

 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>
	
	$(function(){
		if(parent.setit){
			parent.setit("/admin/permissions/limit.edit.html",document.title,"/admin//images/icons/2008112220121595877803.png");
		}
	});
	
	function cancel(){
		if(parent.closeHref){
			parent.closeHref("/admin/permissions/limit.edit.html");
		}else{
			$.closeModalDialog();
		}
	}


	/**
	* 删除权限配置
	**/
	function deleteLimit(id,flag)
	{
		var dialog=top.$.dialog({
				html:"<span style='white-space:nowrap;'>确定要删除当前数据吗？</span>",
				title:"删除权限配置",
				modal: true,			
				onOk:function(){
					dialog.closeDialog();
					var url = "/admin/permissions/limit.delete.do";
					var params = {id:id};
					var protocol = $.getAjax(url,params);
					if(protocol.message){
						top.$.toast(protocol.message);
					}
					if(protocol.success){
						caller.location.href=caller.location.href;		
					}
				}
		 });	
	}
</script>
</html>